Matthias Clasen [Thu, 16 Apr 2020 21:08:31 +0000 (17:08 -0400)]
colorchooser: Fix a crash
Don't crash when we start removing custom colors
that happen to be currently selected.
Matthias Clasen [Thu, 16 Apr 2020 19:46:27 +0000 (15:46 -0400)]
emojichooser: Drop focus adjustment setting
It is not needed here, we are now scrolling
differently.
Matthias Clasen [Fri, 17 Apr 2020 23:34:15 +0000 (23:34 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #1899 and #2627
See merge request GNOME/gtk!1709
Emmanuele Bassi [Fri, 17 Apr 2020 23:28:18 +0000 (23:28 +0000)]
Merge branch 'ebassi/for-master' into 'master'
cups: Disable deprecation warnings
See merge request GNOME/gtk!1710
Matthias Clasen [Fri, 17 Apr 2020 21:50:18 +0000 (17:50 -0400)]
migration docs: Updates
Mention shadow type, relief, aspect frame.
Emmanuele Bassi [Fri, 17 Apr 2020 22:33:20 +0000 (23:33 +0100)]
cups: Disable deprecation warnings
It seems newer releases of CUPS removed the ability to disable
deprecation warnings by defining a pre-processor symbol, so we
have to resort to the usual begin/end ignore deprecation pragmas
to avoid a ton of deprecation warnings.
Emmanuele Bassi [Fri, 17 Apr 2020 22:11:28 +0000 (22:11 +0000)]
Merge branch 'for-master' into 'master'
For master
See merge request GNOME/gtk!1708
Matthias Clasen [Fri, 17 Apr 2020 21:37:52 +0000 (17:37 -0400)]
aspectframe: Modernize
Make GtkAspectFrame not derive from GtkFrame anymore,
since frames now always draw, well, a frame. Also,
add proper setters for the properties of GtkAspectFrame.
Update our sole user.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2627
Emmanuele Bassi [Fri, 17 Apr 2020 21:32:37 +0000 (22:32 +0100)]
Reconcile documentation with declaration and definition
The arguments name in the documentation must match declaration and
definition, or gtk-doc and g-ir-scanner will get very cross at us.
Emmanuele Bassi [Fri, 17 Apr 2020 21:23:32 +0000 (22:23 +0100)]
Copy axes when rewriting events
Matthias Clasen [Fri, 17 Apr 2020 20:13:01 +0000 (16:13 -0400)]
Adwaita: Add focus to expander
We were not drawing a focus indication at all for
expanders. Bring it back. Also, make the color plane
focus snug.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/1899
Matthias Clasen [Fri, 17 Apr 2020 19:43:18 +0000 (15:43 -0400)]
nodeeditor: Don't set has-focus
That is now a readonly property. Set focus-widget
on the toplevel instead.
Matthias Clasen [Fri, 17 Apr 2020 19:27:02 +0000 (19:27 +0000)]
Merge branch 'menu-section-title' into 'master'
popovermenu: Reinstate section title handling
See merge request GNOME/gtk!1707
Matthias Clasen [Fri, 17 Apr 2020 18:17:32 +0000 (18:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gsk: Fall back to cairo if compiling shaders fails
See merge request GNOME/gtk!1706
Matthias Clasen [Fri, 17 Apr 2020 17:53:56 +0000 (13:53 -0400)]
popovermenu: Reinstate section title handling
We were creating a hbox with separators around the label,
but forgot to arrange sizing to prevent the separators from
shrinking into nothingness.
Matthias Clasen [Fri, 17 Apr 2020 16:35:37 +0000 (12:35 -0400)]
gsk: Fall back to cairo if compiling shaders fails
There was already some fallback in place here, but
in other places we were just asserting.
Matthias Clasen [Fri, 17 Apr 2020 17:41:08 +0000 (17:41 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gsk: Fall back to cairo if compiling shaders fails
See merge request GNOME/gtk!1705
Matthias Clasen [Fri, 17 Apr 2020 17:29:56 +0000 (13:29 -0400)]
widget-factory: Add a menu section title
If you can't see it, you can't theme it.
Matthias Clasen [Fri, 17 Apr 2020 16:23:29 +0000 (16:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1703
Matthias Clasen [Fri, 17 Apr 2020 15:06:16 +0000 (11:06 -0400)]
reftests: Stop using shadow-type
Matthias Clasen [Fri, 17 Apr 2020 06:15:14 +0000 (02:15 -0400)]
calendar: Fix focus keynav
This broke when the calendar was broken into widgets.
Matthias Clasen [Fri, 17 Apr 2020 04:32:29 +0000 (00:32 -0400)]
Drop GtkReliefStyle
We are not using this enum anymore.
Matthias Clasen [Fri, 17 Apr 2020 04:31:50 +0000 (00:31 -0400)]
menubutton: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
Matthias Clasen [Fri, 17 Apr 2020 04:20:09 +0000 (00:20 -0400)]
button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
Matthias Clasen [Fri, 17 Apr 2020 03:59:23 +0000 (23:59 -0400)]
Drop GtkShadowType
We are not using this enum anymore.
Matthias Clasen [Fri, 17 Apr 2020 03:58:01 +0000 (23:58 -0400)]
viewport: Drop shadow-type
The viewport draws a frame at the same place as
the scrolled window, so there is really no need
to have that ability in both. Just drop the frame
from viewports.
Matthias Clasen [Fri, 17 Apr 2020 03:48:15 +0000 (23:48 -0400)]
frame: Drop shadow-type
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
Matthias Clasen [Fri, 17 Apr 2020 05:00:15 +0000 (01:00 -0400)]
treeviewcolumn: Stop using a frame
There is no desire to draw a frame here, so don't use a GtkFrame.
Matthias Clasen [Fri, 17 Apr 2020 03:25:06 +0000 (23:25 -0400)]
scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
Matthias Clasen [Fri, 17 Apr 2020 03:26:35 +0000 (23:26 -0400)]
scrolledwindow: Document the .frame style class
Timm Bäder [Fri, 17 Apr 2020 14:43:17 +0000 (16:43 +0200)]
Revert "modelbutton: Emit ::clicked() before closing the popover"
This reverts commit
57f913b7533b3b27ecd17ed7629e2b473e89bcbd.
Matthias Clasen [Fri, 17 Apr 2020 14:12:20 +0000 (14:12 +0000)]
Merge branch 'assorted-menu-fixes' into 'master'
Assorted menu fixes
See merge request GNOME/gtk!1704
Timm Bäder [Fri, 17 Apr 2020 06:14:34 +0000 (08:14 +0200)]
snapshot: Avoid a save/restore pair if we can
Timm Bäder [Fri, 17 Apr 2020 05:37:22 +0000 (07:37 +0200)]
label: Ignore setting attrs from NULL to NULL
Timm Bäder [Fri, 17 Apr 2020 05:27:21 +0000 (07:27 +0200)]
text: unconditionally unref attr list
pango_attr_list_unref() works on NULL
Timm Bäder [Fri, 17 Apr 2020 05:23:15 +0000 (07:23 +0200)]
text: Avoid creating a PangoAttrList we don't need
It's going to be empty, unless we have preedit_attrs
Timm Bäder [Fri, 17 Apr 2020 04:55:00 +0000 (06:55 +0200)]
meson: Use summary()
Instead of doing our own. Bumps the dependency to 0.53 though.
Timm Bäder [Fri, 17 Apr 2020 04:53:23 +0000 (06:53 +0200)]
meson: Trivial formattting
Timm Bäder [Tue, 14 Apr 2020 13:22:52 +0000 (15:22 +0200)]
label: Redraw when text attrs are affected by css change
GtkWidget doesn't do it automatically and probably shouldn't
Timm Bäder [Tue, 14 Apr 2020 09:11:23 +0000 (11:11 +0200)]
label: Don't create an unnecessary attribute list
Timm Bäder [Tue, 14 Apr 2020 09:11:08 +0000 (11:11 +0200)]
label: Only parse mnemonic attributes if we need to
Timm Bäder [Tue, 14 Apr 2020 08:53:48 +0000 (10:53 +0200)]
label: Ignore AFFECTS_ATTRS css changes if we can
It's only interesting if we either already have attributes, or the new
style adds some.
Timm Bäder [Tue, 14 Apr 2020 07:20:00 +0000 (09:20 +0200)]
label: Inline function into only caller
Timm Bäder [Mon, 13 Apr 2020 06:57:36 +0000 (08:57 +0200)]
label: Remove some unused quarks
Timm Bäder [Mon, 13 Apr 2020 06:56:33 +0000 (08:56 +0200)]
label: Remove priv pointer
Timm Bäder [Mon, 13 Apr 2020 06:23:32 +0000 (08:23 +0200)]
label: Stop connecting to notify::gtk-enable-accels
Leftover from when GtkAccelLabel was a GtkLabel subclass. GtkAccelLabel
connects to this itself these days though.
Timm Bäder [Sun, 12 Apr 2020 17:54:20 +0000 (19:54 +0200)]
label: Set underline text and markup in one step
Try to unify the way we parse the mnemonic character
Timm Bäder [Sun, 12 Apr 2020 12:54:54 +0000 (14:54 +0200)]
label: Fold set_pattern_internal into only caller
Timm Bäder [Sun, 12 Apr 2020 09:17:46 +0000 (11:17 +0200)]
adwaita: don't extent %link in linkbuttons
We already do that for the label inside the button.
Timm Bäder [Sun, 12 Apr 2020 09:05:28 +0000 (11:05 +0200)]
label: Remove GtkLabel:track-visited-links
Always track visited state of links. This way all visited links in all
labels look the same. Whether the theme wants to style :visited is the
theme's business.
Timm Bäder [Sun, 12 Apr 2020 08:40:21 +0000 (10:40 +0200)]
label: Remove a11y-only properties
Update them manually instead.
Timm Bäder [Sun, 12 Apr 2020 08:07:15 +0000 (10:07 +0200)]
label: Fold function into only caller
This makes it more obvious that gtk_label_setup_mnemonic() depends on
the root of the widget and it therefore makes sense to call it in
::root/::unroot.
Timm Bäder [Sun, 12 Apr 2020 08:04:30 +0000 (10:04 +0200)]
label: Don't normalize booleans in internal setters
We almost always pass a literal TRUE/FALSE to them.
Timm Bäder [Sun, 12 Apr 2020 07:46:03 +0000 (09:46 +0200)]
stylecontext: Remove get_pango_attributes
Make the only caller use GtkCssNode API.
Timm Bäder [Sun, 12 Apr 2020 07:22:38 +0000 (09:22 +0200)]
cssstyle: Only create PangoAttrList if there are attribtues
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
Timm Bäder [Sun, 12 Apr 2020 07:07:57 +0000 (09:07 +0200)]
label: Pull all pango attributes from the theme
Dont' force an underline attribute here. Just ask the theme for the
text-decoration.
Timm Bäder [Sun, 12 Apr 2020 06:38:34 +0000 (08:38 +0200)]
label: Fix an old TODO comment
Timm Bäder [Sun, 12 Apr 2020 06:36:36 +0000 (08:36 +0200)]
modelbutton: Emit ::clicked() before closing the popover
The clicked handler might still need the popover.
Timm Bäder [Sun, 12 Apr 2020 05:58:09 +0000 (07:58 +0200)]
label: Remove public pattern API
Timm Bäder [Fri, 10 Apr 2020 14:35:15 +0000 (16:35 +0200)]
label: Shorten set_markup_internal a bit
Timm Bäder [Fri, 10 Apr 2020 14:33:12 +0000 (16:33 +0200)]
label: Avoid duplicating a string
We only use str_for_accel if with_uline is TRUE.
Timm Bäder [Fri, 10 Apr 2020 14:29:32 +0000 (16:29 +0200)]
label: Pass <markup> length directly when parsing markup
Timm Bäder [Fri, 10 Apr 2020 14:23:32 +0000 (16:23 +0200)]
label: Remove a double if (needs_root) check
The code is clearer and shorter this way.
Timm Bäder [Fri, 10 Apr 2020 14:16:02 +0000 (16:16 +0200)]
label: Use widget API to add style class
Timm Bäder [Fri, 10 Apr 2020 14:04:20 +0000 (16:04 +0200)]
label: Clear select info before creating a new one
E.g. set_markup_internal will create a new select_info, but then we were
destroying it again, just to recreate it later.
Timm Bäder [Fri, 10 Apr 2020 14:03:37 +0000 (16:03 +0200)]
label: Save a few LOC
Timm Bäder [Fri, 10 Apr 2020 13:41:56 +0000 (15:41 +0200)]
label: Save links in an array
Stop using GList for this.
Timm Bäder [Fri, 10 Apr 2020 07:55:18 +0000 (09:55 +0200)]
widget: Return an array from list_devices
To forther reduce the GList usage in the code base.
Timm Bäder [Fri, 10 Apr 2020 07:54:02 +0000 (09:54 +0200)]
accelgroup: Restructure gtk_accelerator_name
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
Timm Bäder [Fri, 10 Apr 2020 06:17:46 +0000 (08:17 +0200)]
main: Stop using GList when propagating events
There are still some cases missing.
Matthias Clasen [Fri, 17 Apr 2020 13:07:17 +0000 (09:07 -0400)]
widget-factory: Use a model for the complex menu
We had the model already in the ui file, but weren't
using it.
Matthias Clasen [Fri, 17 Apr 2020 13:04:26 +0000 (09:04 -0400)]
modelbutton: Don't show accels without text
We don't want to show accelerators in iconic buttons.
Matthias Clasen [Fri, 17 Apr 2020 12:55:56 +0000 (08:55 -0400)]
widget-factory: Catch errors
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
Matthias Clasen [Fri, 17 Apr 2020 12:37:45 +0000 (08:37 -0400)]
inspector: Fix a crash
Don't crash while picking. The event signal broke
when GdkEvent was turned into a type instance,
since the automatic marshallers don't know how to
deal with that. Manually set the right marshaller.
Matthias Clasen [Thu, 16 Apr 2020 20:36:24 +0000 (20:36 +0000)]
Merge branch 'event-types' into 'master'
Rework event types
Closes #2585
See merge request GNOME/gtk!1702
Emmanuele Bassi [Thu, 16 Apr 2020 16:23:36 +0000 (17:23 +0100)]
Restructure the GdkEvent type hierarchy
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.
The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.
The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
Emmanuele Bassi [Thu, 16 Apr 2020 18:07:02 +0000 (19:07 +0100)]
Fix annotations for GtkEventController
Emmanuele Bassi [Thu, 16 Apr 2020 18:06:04 +0000 (19:06 +0100)]
Fix annotation for gtk_show_uri_full()
The callback is now an asynchronous closure.
Emmanuele Bassi [Thu, 16 Apr 2020 15:37:41 +0000 (16:37 +0100)]
Fix compiler warning
Newer versions of GCC are fairly aggressive with NULL checks.
Matthias Clasen [Thu, 16 Apr 2020 18:05:19 +0000 (18:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
themes: Fix HighContrast dependencies
See merge request GNOME/gtk!1701
Matthias Clasen [Thu, 16 Apr 2020 18:01:29 +0000 (18:01 +0000)]
Merge branch 'css-focus-changes' into 'master'
Add a focus-within state
See merge request GNOME/gtk!1700
Matthias Clasen [Thu, 16 Apr 2020 16:40:37 +0000 (12:40 -0400)]
themes: Fix HighContrast dependencies
HighContrast themes now depend on sass files from Adwaita.
Matthias Clasen [Thu, 16 Apr 2020 12:30:29 +0000 (08:30 -0400)]
Adwaita: Some adjustments for :focus-within
Use :focus-within for focus in entries, since the
actual focus is on the text within, and :focus for
notebooks, since we don't want to draw an outline
around the notebook when the focus is in content.
Matthias Clasen [Thu, 16 Apr 2020 16:09:54 +0000 (12:09 -0400)]
testsuite: Add some checks for focus states
This is some opportunistic checking in a test that
is really about focus chains, but better than nothing.
Matthias Clasen [Thu, 16 Apr 2020 05:36:13 +0000 (01:36 -0400)]
Add a focus-within state
This is used for widgets that contain the focus widget,
reserving the focused state for the focus location itself.
This aligns our focus state handling with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Thu, 16 Apr 2020 15:43:47 +0000 (15:43 +0000)]
Merge branch 'monitor-signals-x11' into 'master'
x11: emit ::enter/leave-monitor
See merge request GNOME/gtk!1699
Olivier Fourdan [Thu, 16 Apr 2020 10:58:39 +0000 (12:58 +0200)]
x11: emit ::enter/leave-monitor
For the X11 backend, keep a list of monitors for which the surface
intersects the monitor area.
Whenever the X11 surface is configured, check against the list of
monitors to determine whether it enters a new monitor or if it left a
monitor, to emit the corresponding ::enter/leave-monitor signals just
like a Wayland compositor would.
As monitors can be added, removed or reconfigured at any time, redo
those checks whenever any of these events occur.
Matthias Clasen [Thu, 16 Apr 2020 03:14:34 +0000 (23:14 -0400)]
Add :focus-visible to css docs
Matthias Clasen [Thu, 16 Apr 2020 03:09:36 +0000 (23:09 -0400)]
css: use :focus-visible instead of :focus(visible)
This is aligning our language with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Wed, 15 Apr 2020 22:26:25 +0000 (22:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
window: Don't set is-active twice
See merge request GNOME/gtk!1698
Matthias Clasen [Wed, 15 Apr 2020 21:08:15 +0000 (17:08 -0400)]
window: Don't set is-active twice
We are listening to focus change events for this
no need to duplicate the work in ::state-changed.
Matthias Clasen [Wed, 15 Apr 2020 19:28:32 +0000 (19:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2612
See merge request GNOME/gtk!1695
Matthias Clasen [Wed, 15 Apr 2020 19:19:21 +0000 (15:19 -0400)]
Updates to NEWS
Matthias Clasen [Wed, 15 Apr 2020 18:56:32 +0000 (14:56 -0400)]
Move key event rewriting
Stop rewriting key and focus events on the GDK side.
Instead deliver them as they are, and propagate them
from the root on the gtk side, in gtkmain.c. And
stop complaining about focus events on popups - we
can just ignore them if we have no use for them.
Matthias Clasen [Wed, 15 Apr 2020 18:43:00 +0000 (14:43 -0400)]
window: Fix setting :is-active
We want to listen to focus events from the windowing
system here, relying on crossing events for this doesn't
work.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2612
Matthias Clasen [Wed, 15 Apr 2020 18:36:04 +0000 (14:36 -0400)]
eventcontroller: Fix signal marshallers
GdkEvent is no longer a GObject. Any signals taking
events as arguments need to have their marshallers
fixed. Thankfully, we have few of these left.
Jakub Steiner [Wed, 15 Apr 2020 17:21:32 +0000 (17:21 +0000)]
Merge branch 'wip/jimmac/drop-text-shadow' into 'master'
Adwaita: drop text shadows for buttons
Closes #2280
See merge request GNOME/gtk!1693
Jakub Steiner [Wed, 15 Apr 2020 13:27:17 +0000 (15:27 +0200)]
Adwaita: drop text shadows for buttons
- People seem to misunderstand the unsharp-mask-like increase
of visual contrast for "fuziness". That is not the reason for
the change. The stylistic change of just going with flat
text label allows to simplify the code and drop complexity.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2280
Matthias Clasen [Wed, 15 Apr 2020 16:23:14 +0000 (16:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1694
Jakub Steiner [Wed, 15 Apr 2020 15:47:14 +0000 (15:47 +0000)]
Merge branch 'wip/jimmac/checkradio-focus' into 'master'
Adwaita: check & radio focus ring
See merge request GNOME/gtk!1690